package com.cafuc.javaEE.util;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;

public class FileCopyUtil {
    private void FileCopyTest(File source, File dest) throws IOException {
        FileUtils.copyFile(source, dest);
    }

    public static void main(String[] args) throws IOException {
        File f1 = new File("E:\\temp\\1.png");
        File f2 = new File("E:\\temp\\temp2\\purple.png");
        FileCopyUtil fileCopyUtil = new FileCopyUtil();
        fileCopyUtil.FileCopyTest(f1, f2);
    }
}
